
package com.plian.system.service.fr.payrolladjustment.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.plian.system.entity.fr.payrolladjustment.PayrollAdjustmentValue;
import com.plian.system.mapper.fr.payrolladjustment.PayrollAdjustmentValueMapper;
import com.plian.system.service.fr.payrolladjustment.IPayrollAdjustmentValueService;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * 工资预算值表 服务实现类
 *
 * @author jianglei
 * @since 2023-05-05
 */
@Service
@AllArgsConstructor
public class PayrollAdjustmentValueServiceImpl extends ServiceImpl<PayrollAdjustmentValueMapper, PayrollAdjustmentValue> implements IPayrollAdjustmentValueService {
    /**
     * logger属性.
     */
    private static final Logger LOGGER  = LoggerFactory.getLogger(PayrollAdjustmentValueServiceImpl.class);


    @Override
    public PayrollAdjustmentValue findValueByLinkId(String linkId, int lineNumber, String columnId) {
        return getOne(Wrappers.<PayrollAdjustmentValue>lambdaQuery().eq(PayrollAdjustmentValue::getLinkId, linkId)
                .eq(PayrollAdjustmentValue::getOrderNumber, lineNumber)
                .eq(PayrollAdjustmentValue::getColumnId, columnId)
                .orderByAsc(PayrollAdjustmentValue::getOrderNumber));
    }
}
